package dr.util;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class LoginManager {
	private static final String USER_ID = "id";
	public static String getUserLoginId(HttpServletRequest request){
		String id = (String)getSession(request).getAttribute(USER_ID);
		return id;
	}
	public static void removeUserLoginId(HttpServletRequest request){
		getSession(request).removeAttribute(USER_ID);
	}
	private static HttpSession getSession(HttpServletRequest request){
		return request.getSession(true);
	}
}
